import CustomNavBar from '@/components/StandNavBar/CustomNavBar';
import Redirect from '@/components/StandSearch/Redirect';
import Taro from '@tarojs/taro';
import React from 'react';
import styles from './index.weapp.module.scss';

const SearchNavBar = ({
  className = '',
  placeholder,
  menuBlock = true,
  ...customNavBarRestParams
}) => {
  return (
    <CustomNavBar
      className={`${styles.SearchNavBar} ${className} customNavigationBarStyle`}
      {...{
        ...customNavBarRestParams,
        menuBlock,
      }}
    >
      <Redirect
        className="redirect"
        placeholder={placeholder}
        showBtn={false}
        onClick={() => {
          Taro.navigateTo({ url: '/mainSubPack/searchResult/index' });
        }}
      />
    </CustomNavBar>
  );
};

export default SearchNavBar;
